#include "mainwindow.h"
#include "ui_mainwindow.h"



MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    t = new Teacher;
    s = new Student;

    connect(t, &Teacher::classdown, s, &Student::play);
    connect(ui->pushButton, &QPushButton::clicked, this, [=](){
        emit Teacher::classdown;
    });
}

MainWindow::~MainWindow()
{
    delete ui;
    delete t;
    delete s;
}

